package br.com.firula.to;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name="usuario_newsletter")
@SequenceGenerator(name="SEQUENCE", sequenceName="usuario_news_seq")
@Inheritance(strategy=InheritanceType.JOINED)
public class UsuarioNewsletterTO extends BaseTO{
    private static final long serialVersionUID = 3257568390917667126L;


	@Id
	@Column(name="id", nullable=false)
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long id;

	@Column(name="nome", nullable=false)
	private String nome;

	@Column(name="email", nullable=false)
	private String email;

	@Override
	public String getAbreviation() {
		return getNome();
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

}

